﻿using System;
using Gadgeteer.Modules.GHIElectronics;

namespace Gadgeteer.Interfaces.GHI.Relay
{
    internal class Relay_X1Wrapper : IRelay
    {
        private readonly Relay_X1 relay;

        internal Relay_X1Wrapper(Relay_X1 relay)
        {
            if (relay == null) throw new ArgumentNullException("relay");

            this.relay = relay;
        }

        public bool Enabled
        {
            get { return relay.Enabled; }
            set { relay.Enabled = value; }
        }

        public void TurnOn()
        {
            relay.TurnOn();
        }

        public void TurnOff()
        {
            relay.TurnOff();
        }
    }
}
